#
# Copyright 2014, NICTA
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(NICTA_BSD)
#

apps-$(CONFIG_APP_SEL4TEST)        += sel4test-driver

# list of libraries the app needs to build
sel4test-driver-y                          = common libsel4 libmuslc libsel4vka libcpio libelf \
                                      libsel4allocman \
                                      libsel4platsupport libsel4platsupport libsel4muslcsys libsel4test \
                                      libsel4simple libsel4vspace libsel4utils libutils

# set up correct simple lib for our kernel
ifdef CONFIG_KERNEL_STABLE
sel4test-driver-$(CONFIG_LIB_SEL4_SIMPLE_STABLE) += libsel4simple-stable
else
sel4test-driver-$(CONFIG_LIB_SEL4_SIMPLE_DEFAULT) += libsel4simple-default
endif

# add the tests app  as a component so that we can elf load it
sel4test-driver-components-y += sel4test-tests
sel4test-driver-components = $(addprefix $(STAGE_BASE)/bin/, $(sel4test-driver-components-y))

sel4test-driver: export COMPONENTS=${sel4test-driver-components}
sel4test-driver: ${sel4test-driver-components-y} kernel_elf $(sel4test-driver-y)
